{% load i18n staticfiles djangobmf_angularjs %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}" ng-controller="FrameworkCtrl">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
        <title>django BMF{% block title %}{% endblock %}</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="author" content="Django BMF" />
        <meta name="Content-Language" content="{{ LANGUAGE_CODE }}" />
        <meta name="language" content="{{ LANGUAGE_CODE }}" />
        <base href="/">{# make the html5 url rewriting work #}
        <link rel="shortcut icon" type="image/x-icon" href="{% static "djangobmf/favicon.ico" %}">
        <link href="{% static "djangobmf/css/djangobmf.min.css" %}?v={{ djangobmf.version }}" rel="stylesheet">
    </head>
    <body data-api="{% url 'djangobmf:api' %}" data-app="{% url 'djangobmf:dashboard' %}">
        {% block full_body %}
        <div id="wrap">
            <div id="sidebar">
                <p class="switch"><a href="#"><img src="{% static "djangobmf/logo.png" %}"></a></p>
                <ul class="sidebar-nav" ng-controller="SidebarCtrl">
                    <li ng-cloak ng-repeat="d in data" ng-class="d.class ? d.class : ''">
                        <a ng-if="d.url != undefined" href="{% ng "d.url" %}">{% ng "d.name" %}</a>
                        <p ng-if="d.url == undefined">{% ng "d.name" %}</p>
                    </li>
                </ul>
            </div>
            <div class="page-container">
                <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
                    <div class="container">
                        <div class="navbar-header visible-xs">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                                <span class="sr-only">{% trans "Toogle navigation" %}</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="#">django BMF</a>
                        </div><!--/.nav-header -->
                        <div class="collapse navbar-collapse navbar-ex1-collapse">
                            <ul class="nav navbar-nav dashboards" ng-controller="DashboardCtrl">
                                <li class="dropdown">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-dashboard"></span> {% trans "Dashboards" %} <b class="caret"></b></a>
                                    <ul class="dropdown-menu" ng-cloak>
                                        <li ng-repeat="d in data | orderBy:'name'" ng-class="d.active ? 'active' : ''">
                                            <a ng-click="update(d.key)" href>{% ng "d.name" %}</a>
                                        </li>
                                    </ul>
                                </li>
                                <li ng-if="current" ng-cloak class="hidden-xs">
                                    <p class="navbar-text">{% ng "current.name" %}</p>
                                </li>
                            </ul>
                            <ul ng-controller="NavigationCtrl" class="nav navbar-nav navbar-right">
                                <li ng-repeat="n in data" class="bmf-navigation">
                                    <a href="{% ng "n.url" %}" ng-class="n.active ? 'active' : ''">
                                        <span class="{% ng "n.symbol" %}"></span>
                                        <span class="nav-text">{% ng "n.name" %}</span>
                                    </a>
                                </li>
                                <li class="dropdown">
                                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                        <span class="glyphicon glyphicon-user"></span>
                                        <span class="nav-text">{% trans "Settings" %}:</span>
                                        {{ request.user }}<b class="caret"></b>
                                    </a>
                                    <ul class="dropdown-menu">
                                        {% if request.user.is_staff %}
                                        <li>
                                            <a href="{% url 'djangobmf:configuration' %}">{% trans "Configuration" %}</a>
                                        </li>
                                        <li>
                                            <a href="{% url 'admin:index' %}">{% trans "Administration" %}</a>
                                        </li>
                                        {% endif %}
                                        <li class="divider"></li>
                                        <li>
                                            <a href="{% url 'djangobmf:change_password' %}">{% trans "Change Password" %}</a>
                                        </li>
                                        <li>
                                            <a id="bmfapi_logout" href="{% url 'djangobmf:modal_logout' %}">{% trans "Logout" %}</a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </div><!--/.nav-collapse -->
                    </div><!--/.container -->
                </nav>
                <div class="container">
                    {% if messages %}
                    <div class="row">
                        <div class="col-lg-12">
                            {% for message in messages %}
                            {% if message.tag == "error" %}
                                <div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">&times;</button>{{ message }}</div>
                            {% elif message.tag == "warning" or message.tag == "debug" %}
                                <div class="alert alert-warning"><button type="button" class="close" data-dismiss="alert">&times;</button>{{ message }}</div>
                            {% elif message.tag == "success" %}
                                <div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">&times;</button>{{ message }}</div>
                            {% else %}
                                <div class="alert alert-info"><button type="button" class="close" data-dismiss="alert">&times;</button>{{ message }}</div>
                            {% endif %}
                            {% endfor %}
                        </div>
                    </div>{% endif %}
                    <div ng-cloak bmf-content {% block content_container %}{% endblock %}>{% block full_content %}{% endblock %}</div>
                </div> <!-- /container -->
                <div class="container bmf-site-content"></div>
                <div class="container bmf-site-related">{% include "djangobmf/site-related.html" %}</div>
                <div class="container bmf-site-activity">{% include "djangobmf/site-activity.html" %}</div>
            </div> <!-- /page-container -->
        </div>
        <footer>
            <div class="container">
                {% block bmf-footer %}
                <p><a href="http://www.django-bmf.org">django BMF</a> v{{ djangobmf.version }}</small></p>
                {% endblock %}
            </div>
        </footer>
        {% endblock %}
        <script src="{% url "djangobmf:jsi18n" %}?v={{ djangobmf.version }}"></script>
        <script src="{% static "djangobmf/js/jquery.min.js" %}"></script>
        <script src="{% static "djangobmf/js/angular.min.js" %}"></script>
        <script src="{% static "djangobmf/js/d3.min.js" %}"></script>
        {% if debugjs %}
        <script src="{% static "djangobmf/js/jquery.cookie.min.js" %}?v={{ djangobmf.version }}"></script>
        <script src="{% static "djangobmf/js/bootstrap.min.js" %}?v={{ djangobmf.version }}"></script>
        <script src="{% static "djangobmf/js/djangobmf.js" %}?v={{ djangobmf.version }}"></script>
        {% else %}
        <script src="{% static "djangobmf/js/djangobmf.min.js" %}?v={{ djangobmf.version }}"></script>
        {% endif %}
    </body>
</html>
